<style type="text/css">
  .errorMessage{
    color:red;
  }
</style>
<div class="container member-container">
  <?php include $this->getViewFile('../lib/leftmenu'); ?>
  <div class="col-md-10 member-con mb-alwang-con">
    <div class="title mb-common-title"><span>转为卖家</span><div style="margin: -26px 767px;" class="tips_hold"id="tip_12" data-content="买家账户可转为卖家，所获得的原有积分将被清空"></div></div>
    <?php $objForm = $this->beginWidget( 'CActiveForm', array('id' => 'SubmitForm')); ?>
      <table>
        <tbody>
          <tr>
            <td width="80" class="head"><?php echo $objForm->labelEx( $model, 'phone' ) ?>:</td>
            <td width="500">
              <?php if($userinfo->phone){
                echo $userinfo->phone;
              }else{
                echo $objForm->textField($model,'phone',array('maxlength' => 60)) ?><?php echo $objForm->error( $model, 'phone' );
              } ?>
            </td>
            <td></td>
          </tr>
          <tr>
            <td width="80" class="head"><?php echo $objForm->labelEx( $model, 'alipay' ) ?>:</td>
            <td width="500">
              <?php if($userinfo->alipay){
                echo $userinfo->alipay;
              }else{              
                echo $objForm->textField($model,'alipay',array('maxlength' => 60));  
                echo '审核通过后不能修改';
                echo $objForm->error( $model, 'alipay' ); 
              } ?>
            </td>
            <td></td>
          </tr>
          <tr>
            <td width="80" class="head"><?php echo $objForm->labelEx( $model, 'alipay_name' ) ?>:</td>
              <td width="500">
              <?php if($userinfo->alipay_name){
                echo $userinfo->alipay_name;
              }else{              
                echo $objForm->textField($model,'alipay_name',array('maxlength' => 60)); 
                echo '审核通过后不能修改';
                echo $objForm->error( $model, 'alipay_name' ); 
              } ?>
            </td>
            <td></td>
          </tr>
          <tr>
            <td width="80" class="head"><?php echo $objForm->labelEx( $model, 'taobao_user_nick' ) ?>:</td>
              <td width="500">
              <?php if($usertaobao->taobao_user_nick){
                echo $usertaobao->taobao_user_nick;
              }else{              
                echo $objForm->textField($model,'taobao_user_nick',array('maxlength' => 60)); 
                echo '审核通过后不能修改';
                echo $objForm->error( $model, 'taobao_user_nick' ); 
              } ?>
            </td>
            <td></td>
          </tr>
          <tr>
            <td width="80" class="head"><?php echo $objForm->labelEx( $model, 'cause' ) ?>:</td>
            <td width="500" height="100"><?php echo $objForm->textArea($model,'cause',array('style' => 'width:200px;height:100px')) ?></td>
            <td></td>
          </tr>
          <tr>
                <td width="80"  class="head"></td>
                <td width="500"><input class="login-spt btn" type="submit" name="yt0" value="提交" /></td>
                <td></td>
            </tr>
        </tbody>
      </table>
    <?php $this->endWidget(); ?>
  </div>
  <div class="clearfix"></div>
</div>

<script type="text/javascript">
  var Sub = false;
  $(function(){
    $("#SubmitForm").submit(function(){
      if(Sub){
        return true;
      }
      dialog({
        title:'提示',
        content:'转换后积分与经验都会清零',
        okValue:'确定',
        cancelValue:'取消',
        ok:function(){
          Sub = true;
          $("#SubmitForm").submit();
        },
        cancel:function(){
          return true;
        }
      }).show();
      return false;
    })
  })
</script>
